package com.tanhua.dubbo.api;

import com.tanhua.dubbo.api.db.OptionApi;
import com.tanhua.dubbo.api.mapper.OptionMapper;
import com.tanhua.model.db.Option;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
@Slf4j
public class OptionApiImpl implements OptionApi {
    @Autowired
    private OptionMapper optionMapper;

    /**
     * 根据选项Id获取选项 zhengzheng、liuhaijie、zhangfude
     * @param optionId 选项Id
     * @return 选项
     */
    @Override
    public Option getOption(String optionId) {
        return optionMapper.selectById(optionId);
    }
}
